package com.sky.mapper;

import com.sky.dto.GoodsSalesDTO;
import com.sky.entity.Dish;
import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 赵星
 * @version 1.0
 * @Date 2023/9/27 21:09
 */
@Mapper
public interface OrderDetailMapper {
    void insertBatch(List<OrderDetail> orderDetailList);

    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> selectDetailByOrderId(Long orderId);

    //根据订单id查询所关联的菜品信息
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> selectDishListByOrderId(Long id);


}
